<template>
  <div class="task-query-div">
    <ToolBarComponent ref="task-query-bar">
      <InputComponent input-lable="任务编号" input-name="taskNo"/>
      <InputComponent input-lable="模块编号" input-name="moduelNo"/>
      <Button text="查询" :click-function="query"/>
    </ToolBarComponent>
    <!--   物品查询列表   -->
    <GridComponent
        ref="copyTaskGrid"
        :auto-load="true"
        key-property-name="id"
        grid-name="copyTaskGrid"
        select-moduel="single"
        load-url="txtCopy/selectTxtCopyTask.do"
        max-height-prop="83%"
        :paging-moduel="true"
    >
      <GridColumnComponent width="320px" column-name="任务编号" index-name="taskNo"/>
      <GridColumnComponent width="200px" column-name="模块编号" index-name="moduelNo"/>
      <GridColumnComponent width="230px" column-name="目标网址" index-name="targetPath"/>
      <GridColumnComponent width="200px" column-name="输出文件" index-name="filePath"/>
      <GridColumnComponent width="500px" column-name="任务信息" index-name="taskJson"/>
      <GridColumnComponent width="200px" column-name="执行百分比" index-name="percent"/>
    </GridComponent>
  </div>
</template>

<script>
import ToolBarComponent from "@/components/toolbar/ToolBarComponent";
import InputComponent from "@/components/input/InputComponent";
import GridColumnComponent from "@/components/grid/GridColumnComponent";
import GridComponent from "@/components/grid/GridComponent";
import Button from "@/components/button/ButtonComponent";

export default {
  name: "CopyTaskQuery",
  components: {Button, GridComponent, GridColumnComponent, InputComponent, ToolBarComponent},
  methods:{
    query(){
      let param = this.$refs["task-query-bar"].getSubmitParams();
      this.$refs["copyTaskGrid"].addQueryParams(param);
      this.$refs["copyTaskGrid"].load();
    }
  }
}
</script>

<style scoped>
.task-query-div{
  width: 100%;
  min-height: 100%;
}
</style>